package test;

import java.util.List;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import csc.com.repository.Users;
import csc.com.service.GetDataUser;

public class App {
	private static ApplicationContext context;

	public static void main(String[] args) {
		  context = new ClassPathXmlApplicationContext("Beans.xml");
		  
		      GetDataUser getDataUser = 
		      (GetDataUser)context.getBean("getDataUser");
		      
		      System.out.println("------Listing Multiple Records--------" );
		      List<Users> user = getDataUser.listUsers();
		      for (Users record : user) {
		         System.out.print("loginId : " + record.getLoginId());
		         System.out.print(", First Name : " + record.getFirstName());
		         System.out.println(", Last Name : " + record.getLastName());
		         System.out.print("Id Card Number : " + record.getIdCardNumber());
		      }
	}
}
